﻿<%@ Page Language="C#" AutoEventWireup="true" Codebehind="recipientslist.aspx.cs"
    Inherits="LabMS.Web.Equipment.Consum.recipientslist" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>耗材领用情况</title>
    <link type="text/css" rel="stylesheet" href="../../style/screen.css" />
    <!--[if lte IE 6]>
    <link type="text/css" rel="stylesheet" href="../../style/ie6.css" />
    <![endif]-->
    <!--[if lte IE 7]>
    <link type="text/css" rel="stylesheet" href="../../style/ie7.css" />
    <![endif]-->

    <script src="../../js/calendar5.js" type="text/javascript"></script>

    <script type="text/javascript" src="../../js/Common.js"></script>

    <script type="text/javascript">
        var c = new Calendar("c");
        document.write(c);
    </script>

</head>
<body class="mainBody">
    <form id="form1" runat="server">
        <div class="main">
            <div id="pageInfo" class="clearfix">
                <div class="title">
                    <label>
                        耗材领用情况</label>
                </div>
            </div>
        </div>
        <div class="main">
            <p>
                <asp:Label ID="lbErr" runat="server" ForeColor="Red" Text="Err" Visible="False"></asp:Label>
                <asp:Label ID="lbSearch" runat="server" Text="0" Visible="False"></asp:Label>
            </p>
            <p>
                领用实验室:
                <asp:DropDownList ID="ddlLab" runat="server">
                </asp:DropDownList>
                耗材名称:<asp:TextBox ID="tbCName" runat="server"></asp:TextBox>
                编号:<asp:TextBox ID="tbNumbers" runat="server"></asp:TextBox>
                领用人:<asp:TextBox ID="tbUPerson" runat="server"></asp:TextBox>
            </p>
            <p>
                领用时间:<asp:TextBox ID="tbTime1" runat="server"></asp:TextBox>--<asp:TextBox ID="tbTime2"
                    runat="server"></asp:TextBox>
                领用仓库:
               <asp:TextBox ID="tbLocation" runat="server" MaxLength="40"></asp:TextBox>
                        <input id="btnWindowsLcoation" onclick="OpenEditWinOther('../Common/Location.aspx',600,400)"
                            type="button" value="..." class="button" />      
                <asp:Button ID="btSearch" runat="server" Text="搜索" OnClick="btSearch_Click" CssClass="button" />
                <asp:Button ID="btReset" runat="server" Text="重置" OnClick="btReset_Click" CssClass="button" />
            </p>
        </div>
        <div class="main">
            <asp:GridView ID="GridViewRConsum" runat="server" Width="100%" PageSize="15" AllowPaging="true"
                DataKeyNames="ID" AutoGenerateColumns="False" OnRowDataBound="GridViewConsum_RowDataBound"
                OnPageIndexChanging="GridViewConsum_PageIndexChanging" CssClass="infoTable">
                <Columns>
                    <asp:BoundField DataField="Name" HeaderText="耗材名称" />
                    <asp:BoundField DataField="Numbers" HeaderText="编号" />
                    <asp:BoundField DataField="Recipients" HeaderText="领用人" />
                    <asp:BoundField DataField="Laboratory" HeaderText="实验室" />
                    <asp:BoundField DataField="EncodedTime" HeaderText="领用时间" DataFormatString="{0:yyyy/MM/dd}"
                        HtmlEncode="false" />
                    <asp:BoundField DataField="EncodedWarehouse" HeaderText="领用仓库" />
                    <asp:BoundField DataField="QuantityRecipients" HeaderText="领用数量" DataFormatString="{0:N2}" />
                    <asp:BoundField DataField="UnitPrice" HeaderText="单价" DataFormatString="{0:N2}" />
                    <asp:BoundField DataField="TotalAmount" HeaderText="总价" DataFormatString="{0:N2}" />
                </Columns>
                <HeaderStyle CssClass="header" />
                <RowStyle HorizontalAlign="Center" />
                <EmptyDataTemplate>
                    <a style="color: Red">无数据</a>
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
        <div style="display: none">
            <asp:TextBox ID="tbLocationCode" runat="server"></asp:TextBox>
        </div>
    </form>

    <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

    <script type="text/javascript" src="../../js/site.js"></script>

    <script type="text/javascript">

        $(function(){
            /* 修改样式 */
            $("#GridViewRConsum > tbody > tr:even").not(":first").addClass("even");
            $("#GridViewRConsum > tbody > tr").not(":first")
                .hover(
                    function(){
                        $(this).addClass("hover");
                    },
                    function(){
                        $(this).removeClass("hover");
                });
        });
        
        function OpenEditWinOther(frmWin,width,height) 
      {       
           var me; 
           me = window;  
           var ret = window.showModalDialog(frmWin,me,'dialogWidth='+width +'px;dialogHeight='+height+'px;help:no;status:no');
              if (ret != null) 
            {
                document.getElementById("tbLocation").value = ret[1];
                document.getElementById("tbLocationCode").value = ret[0];
            }  
      } 
    </script>

</body>
</html>
